{template "header.html"}

{template "api_list_date_search.html"}

<div class="note note-danger">
    <p>{dr_lang('确保网站目录必须有可写权限')}</p>
</div>

<div class="portlet bordered light form-horizontal">
    <div class="portlet-title tabbable-line">
        <ul class="nav nav-tabs" style="float:left;">
            <li class="active">
                <a href="#tab_0" data-toggle="tab"> <i class="fa fa-cog"></i> {dr_lang('网站')} </a>
            </li>
            {loop $module $i $mod}
            {if !$mod.share}
            <li>
                <a href="#tab_{$i}" data-toggle="tab"> <i class="{$mod.icon}"></i> {dr_lang($mod.name)} </a>
            </li>
            {/if}
            {/loop}
        </ul>
    </div>
    <div class="portlet-body">
        <div class="tab-content" style="padding-top: 10px">

            <div class="tab-pane active" id="tab_0">
                <div class="form-body">

                    <div class="form-group">
                        <label class="col-md-2 control-label">{dr_lang('网站首页')}</label>
                        <div class="col-md-9">
                            <label><button type="button" onclick="dr_admin_menu_ajax('{WEB_DIR}index.php?c=home&m=html', 1)" class="btn blue"> <i class="fa fa-file-o"></i> {dr_lang('生成首页静态文件')} </button></label>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-2 control-label">{dr_lang('快捷配置')}</label>
                        <div class="col-md-9">

                            <label><button type="button" onclick="dr_iframe_show('{dr_lang('栏目设置')}', '{dr_url('module/seo_category/index')}')" class="btn default"> 按栏目设置URL规则 </button></label>
                            <label><a href="javascript:dr_iframe_show('{dr_lang('一键更新')}', '{dr_url('chtml/config/sync_index')}', '500px', '300px')" class="btn default"> <i class="fa fa-cog"></i> {dr_lang('一键开启共享栏目静态')} </a></label>
                            <label><a href="javascript:dr_iframe_show('{dr_lang('一键更新')}', '{dr_url('chtml/config/sync2_index')}', '500px', '300px')" class="btn default"> <i class="fa fa-cog"></i> {dr_lang('一键关闭共享栏目静态')} </a></label>
                            <label><a href="javascript:dr_update_cache_all();" class="btn default"> {dr_lang('一键更新栏目URL')} </a></label>

                        </div>
                    </div>

                    <form id="myform_share_category">
                        <div class="form-group " style="border-top: 1px dashed #eef1f5; padding-top: 10px;">
                            <label class="col-md-2 control-label">{dr_lang('最大分页限制')}</label>
                            <div class="col-md-9">
                                <label><input type="text" class="form-control" value="" name="maxsize"></label>

                                <span class="help-block">{dr_lang('当栏目页数过多时，设置此数量可以生成指定的页数，后面页数就不会再生成')}</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('按所选栏目')}</label>
                            <div class="col-md-9">
                                {php echo \Phpcmf\Service::L('category', 'module')->select('share', 0, 'name=\'ids[]\' multiple style=\'width:370px;height:400px\'', dr_lang('全部栏目'));}
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('生成共享栏目（PC端）')}</label>
                            <div class="col-md-9">
                                <label><button type="button" onclick="dr_bfb('{dr_lang('生成共享栏目')}', 'myform_share_category', '{dr_url('chtml/cat/category_index')}&app=')" class="btn dark"> <i class="fa fa-th-large"></i> {dr_lang('开始生成静态')} </button></label>
                                <label><button type="button" onclick="dr_bfb('{dr_lang('生成共享栏目')}', 'myform_share_category', '{dr_url('chtml/cat/category_point_index')}&app=')" class="btn red"> <i class="fa fa-th-large"></i> {dr_lang('上次未执行完毕时继续执行')} </button></label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">{dr_lang('生成共享栏目（移动端）')}</label>
                            <div class="col-md-9">
                                <label><button type="button" onclick="dr_bfb('{dr_lang('生成共享栏目')}', 'myform_share_category', '{dr_url('chtml/cat/category_index')}&is_mobile=1&app=')" class="btn dark"> <i class="fa fa-th-large"></i> {dr_lang('开始生成静态')} </button></label>
                                <label><button type="button" onclick="dr_bfb('{dr_lang('生成共享栏目')}', 'myform_share_category', '{dr_url('chtml/cat/category_point_index')}&is_mobile=1&app=')" class="btn red"> <i class="fa fa-th-large"></i> {dr_lang('上次未执行完毕时继续执行')} </button></label>

                            </div>
                        </div>
                    </form>
                </div>

            </div>

            {loop $module $i $mod}
            {if !$mod.share}
            <div class="tab-pane " id="tab_{$i}">
                <div class="form-group">
                    <label class="col-md-2 control-label">{dr_lang('模块首页')}</label>
                    <div class="col-md-9"><label><button type="button" onclick="dr_admin_menu_ajax('{WEB_DIR}index.php?s={$mod.dirname}&c=html&m=index', 1)" class="btn blue"> <i class="fa fa-home"></i> {dr_lang('生成模块首页')} </button></label>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-md-2 control-label">{dr_lang('快捷配置')}</label>
                    <div class="col-md-9">

                        <label><button type="button" onclick="dr_iframe_show('{dr_lang('栏目设置')}', '{dr_url('module/seo_module/index')}&dir={$mod.dirname}')" class="btn default"> 按栏目设置URL规则 </button></label>

                        <label><a href="javascript:dr_update_cache_all();" class="btn default"> {dr_lang('一键更新栏目URL')} </a></label>

                    </div>
                </div>

                <form id="myform_category_{$i}">
                    <div class="form-group " style="border-top: 1px dashed #eef1f5; padding-top: 10px;">
                        <label class="col-md-2 control-label">{dr_lang('最大分页限制')}</label>
                        <div class="col-md-9">
                            <label><input type="text" class="form-control" value="" name="maxsize"></label>

                            <span class="help-block">{dr_lang('当栏目页数过多时，设置此数量可以生成指定的页数，后面页数就不会再生成')}</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">{dr_lang('按所选栏目')}</label>
                        <div class="col-md-9">
                            {php echo \Phpcmf\Service::L('category', 'module')->select($mod.dirname, 0, 'name=\'ids[]\' multiple style=\'width:370px;height:400px\'', dr_lang('全部栏目'));}
                        </div>
                    </div>
                    <div class="form-group" style="border-bottom: 1px dashed #eef1f5; padding-bottom: 10px;">
                        <label class="col-md-2 control-label">{dr_lang('生成栏目（PC端）')}</label>
                        <div class="col-md-9">
                            <label><button type="button" onclick="dr_bfb('{dr_lang('生成栏目')}', 'myform_category_{$i}', '{dr_url('chtml/cat/category_index')}&app={$mod.dirname}')" class="btn dark"> <i class="fa fa-th-large"></i> {dr_lang('开始生成静态')} </button></label>
                            <label><button type="button" onclick="dr_bfb('{dr_lang('生成共享栏目')}', 'myform_share_category', '{dr_url('chtml/cat/category_point_index')}&app={$mod.dirname}')" class="btn red"> <i class="fa fa-th-large"></i> {dr_lang('上次未执行完毕时继续执行')} </button></label>
                        </div>
                    </div>
                    <div class="form-group" style="border-bottom: 1px dashed #eef1f5; padding-bottom: 10px;">
                        <label class="col-md-2 control-label">{dr_lang('生成栏目（移动端）')}</label>
                        <div class="col-md-9">
                            <label><button type="button" onclick="dr_bfb('{dr_lang('生成栏目')}', 'myform_category_{$i}', '{dr_url('chtml/cat/category_index')}&is_mobile=1&app={$mod.dirname}')" class="btn dark"> <i class="fa fa-th-large"></i> {dr_lang('开始生成静态')} </button></label>
                            <label><button type="button" onclick="dr_bfb('{dr_lang('生成共享栏目')}', 'myform_share_category', '{dr_url('chtml/cat/category_point_index')}&is_mobile=1&app={$mod.dirname}')" class="btn red"> <i class="fa fa-th-large"></i> {dr_lang('上次未执行完毕时继续执行')} </button></label>
                        </div>
                    </div>
                </form>

            </div>
            {/if}
            {/loop}


        </div>
    </div>
</div>


{template "footer.html"}